import Vue from 'vue'
import Router from 'vue-router'
import thLayout from '@/views/layout/index.vue'
Vue.use(Router)
export const defaultRouterMap = [
{
  component: thLayout,
  path: '',
  redirect: '404',
  children: [
    {
      path: '/404',
      name: '404',
      component: () => import('@/views/404'),
      meta: { title: '404', icon: '404', id: 1, hide: false, leaf: true }
    }
  ]
}
]

var vuerouter = new Router({
  // mode: 'history', //后端支持可开
  scrollBehavior: () => ({ y: 0 }),
  routes: defaultRouterMap// .concat(defaultRouterMap) // .concat(defaultRouterMap)
})
export default vuerouter
